﻿namespace Lite.Messaging
{
    using System;
    using Lite.Common;

    /// <summary>
    /// An interface for monitoring a message queue.
    /// </summary>
    public interface IQueueMonitor
        : IStartHaltPauseRestart
    {
        /// <summary>
        /// Occurs when there is a message available on the monitored queue.
        /// </summary>
        event EventHandler<MessageQueueEventArgs> MessageAvailable;

        /// <summary>
        /// Gets the message queue monitored by this instance.
        /// </summary>
        IMessageQueue MessageQueue { get; }
    }
}
